﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="EditTeam.aspx.cs" Inherits="SD.Web.Views.TeamMaintenance.EditTeam" %>

<%@ Register TagName="TypeOfBusinessLookup" TagPrefix="wuc" Src="~/Controls/Lookup/TypeOfBusinessLookup.ascx" %>
<%@ Register TagPrefix="wuc" TagName="ContactLookupPopup" Src="~/Controls/Lookup/ContactLookup.ascx" %>
<%@ Register TagPrefix="wuc" TagName="AddressLookupPopup" Src="~/Controls/Lookup/AddressLookupControl.ascx" %>
<%@ Register TagPrefix="wuc" TagName="DialogBox" Src="~/Controls/DialogBox.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="../../style/AnhPopup.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        $(function () {
            $("#tabs").tabs();
        });
        function Alert() {
            alert("Save successfull")
        } 
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentTitle" runat="server">
    <h2 style="text-align: center">
        TEAM DETAIL</h2>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Content" runat="server">
    <div class="grid740 simplebox relative">
        <wuc:DialogBox ID="DialogBox" runat="server" />
        <div id="tabs">
            <ul>
                <li>
                    <asp:HyperLink ID="LinkDetails01" runat="server" NavigateUrl="#DetailsPanel01">Details</asp:HyperLink>
                </li>
            </ul>
            <span class="top-right-cornor">
                <asp:Label ID="lblResult" ForeColor="Red" runat="server">
                </asp:Label>
                <asp:Button CssClass="st-button" ID="ButtonDeactivate" runat="server" Text='In-Activate'
                    CommandName="active" CausesValidation="False" OnClick="ButtonDeactivate_Click"
                    Width="84px" />
                <asp:Button ID="ButtonSave" runat="server" CssClass="st-button" Text="Save" OnClick="ButtonSave_Click"
                    Enabled="true" />
                <asp:Button ID="ButtonBack" runat="server" CausesValidation="False" CssClass="st-button"
                    Text="Back" OnCommand="ButtonBack_Command" OnClick="ButtonBack_Click" />
            </span>
            <div class="clear">
            </div>
            <%--CONTACT LOOKUP--%>
            <%--WEB USER CONTROL--%>
            <%--ADDRESS - POSTCODE LOOKUP--%>
            <asp:Panel ID="DetailsPanel01" runat="server" ClientIDMode="Static">
                <%--Mỗi một dòng có đường kẻ ngang là một div với class st-form-line-noleft--%>
                <div class="st-form-line-noleft">
                    <%--Phần bên trái của 1 dòng là 1 label và 1 textbox, checkbox,...--%>
                    <div class="half">
                        <asp:Label ID="LabelTeamName" runat="server" AssociatedControlID="txtTeamName" CssClass="st-labeltext level1 required"
                            Text="Team Name">
                            <asp:RequiredFieldValidator ID="RequiredOrganizationName" runat="server" ErrorMessage="*"
                                Display="None" SetFocusOnError="true" ForeColor="red" ControlToValidate="txtTeamName" />
                        </asp:Label><asp:TextBox ID="txtTeamName" runat="server" CssClass="st-forminput"
                            Width="200px"></asp:TextBox></div><%--Phần bên phải tương tự nhưng có thêm class là last--%><div class="half last">
                        <asp:Label ID="LabelTypeOfBusiness" runat="server" AssociatedControlID="txtTypeOfBusiness"
                            CssClass="st-labeltext level1" Text="Type of Business">
                        </asp:Label><asp:TextBox ID="txtTypeOfBusiness" runat="server" CssClass="st-forminput st-disable"
                            Width="150px" ReadOnly="True"></asp:TextBox><asp:LinkButton ID="ButtonTypeOfBusiness"
                                runat="server" CausesValidation="False" CssClass="hg-blue" Text="Lookup" OnClick="ButtonTypeOfBusiness_Click" />
                    </div>
                    <%--Bắt buộc phải có phần này sau 2 thẻ div có class là half--%>
                    <div class="clear">
                    </div>
                </div>
                <%--Mỗi một dòng có đường kẻ ngang là một div với class st-form-line-noleft--%>
                <div class="st-form-line-noleft">
                    <div class="half">
                        <asp:Label ID="LabelShortDescription" runat="server" AssociatedControlID="txtShortDescription"
                            CssClass="st-labeltext level1" Text="Team Short Description">
                        </asp:Label><asp:TextBox ID="txtShortDescription" runat="server" CssClass="st-forminput"
                            Rows="3" TextMode="MultiLine" Width="200px"></asp:TextBox></div><div class="half last">
                        <asp:Label ID="LabelSicCode" runat="server" AssociatedControlID="txtSicCode" CssClass="st-labeltext level1"
                            Text="SIC"></asp:Label><asp:TextBox ID="txtSicCode" runat="server" CssClass="st-forminput st-disable"
                                Width="50px" ReadOnly="true"></asp:TextBox><br /></div><div class="clear">
                    </div>
                </div>
                <div class="st-form-line-noleft">
                    <div class="half">
                        <asp:Label ID="LabelLeadContact" runat="server" AssociatedControlID="txtLeadContact"
                            CssClass="st-labeltext level1" Text="Lead Contact"></asp:Label><asp:TextBox ID="txtLeadContact"
                                runat="server" CssClass="st-forminput st-disable" Width="150px" ReadOnly="True"></asp:TextBox><asp:LinkButton
                                    ID="ButtonContactLookup" runat="server" CausesValidation="False" CssClass="hg-blue"
                                    Text="Lookup" OnClick="ButtonContactLookup_Click" />
                        <br />
                        <br />
                        <asp:Label ID="Label2" runat="server" AssociatedControlID="rdbListAddress" CssClass="st-labeltext level1-5"
                            Text="Copy address from"></asp:Label><asp:RadioButtonList ID="rdbListAddress" runat="server"
                                AutoPostBack="True" OnSelectedIndexChanged="rdbListAddress_SelectedIndexChanged"
                                RepeatDirection="Horizontal">
                                <asp:ListItem Value="Organization">Organization</asp:ListItem><asp:ListItem Value="Parent">Parent</asp:ListItem></asp:RadioButtonList></div><div class="half last">
                        <asp:Label ID="LabelFullDescription" runat="server" AssociatedControlID="txtFullDescription"
                            CssClass="st-labeltext level1" Text="Full Description"></asp:Label><asp:TextBox ID="txtFullDescription"
                                runat="server" CssClass="st-forminput" Rows="3" TextMode="MultiLine" Width="200px"></asp:TextBox></div><div class="clear">
                    </div>
                </div>
                <div class="st-form-line-noleft">
                    <div class="half">
                        <asp:Label ID="LabelAddressLine1" runat="server" AssociatedControlID="txtAddressLine1"
                            CssClass="st-labeltext level1" Text="Address Line 1">
                        </asp:Label><asp:TextBox ID="txtAddressLine1" runat="server" CssClass="st-forminput"
                            Width="200px"></asp:TextBox></div><div class="half last">
                        <asp:Label ID="LabelPhoneNumber" runat="server" AssociatedControlID="txtPhoneNumber"
                            CssClass="st-labeltext level1" Text="Phone Number">
                        </asp:Label><asp:TextBox ID="txtPhoneNumber" runat="server" CssClass="st-forminput"
                            Width="200px"></asp:TextBox><br /><asp:CompareValidator ID="CompareValidatorPhoneNumber" runat="server" ErrorMessage="Phone number must be digits"
                            ControlToValidate="txtPhoneNumber" Display="Dynamic" ForeColor="#CC0000" Operator="DataTypeCheck"
                            SetFocusOnError="True" Type="Integer">
                        </asp:CompareValidator></div><div class="clear">
                    </div>
                </div>
                <div class="st-form-line-noleft">
                    <div class="half">
                        <asp:Label ID="LabelAddressLine2" runat="server" AssociatedControlID="txtAddressLine2"
                            CssClass="st-labeltext level1" Text="Address Line 2"></asp:Label><asp:TextBox ID="txtAddressLine2"
                                runat="server" CssClass="st-forminput" Width="200px">
                            </asp:TextBox></div><div class="half last">
                        <asp:Label ID="LabelFax" runat="server" AssociatedControlID="txtFax" CssClass="st-labeltext level1"
                            Text="Fax">
                        </asp:Label><asp:TextBox ID="txtFax" runat="server" CssClass="st-forminput" Width="200px"></asp:TextBox><br /><asp:CompareValidator ID="CompareValidatorFax" runat="server" ErrorMessage="Fax must be digits"
                            ControlToValidate="txtFax" Display="Dynamic" ForeColor="#CC0000" Operator="DataTypeCheck"
                            SetFocusOnError="True" Type="Integer"></asp:CompareValidator></div><div class="clear">
                    </div>
                </div>
                <div class="st-form-line-noleft">
                    <div class="half">
                        <asp:Label ID="LabelAddressLine3" runat="server" AssociatedControlID="txtAddressLine3"
                            CssClass="st-labeltext level1" Text="Address Line 3"></asp:Label><asp:TextBox ID="txtAddressLine3"
                                runat="server" CssClass="st-forminput" Width="200px"></asp:TextBox></div><div class="half last">
                        <asp:Label ID="LabelEmail" runat="server" AssociatedControlID="txtEmail" CssClass="st-labeltext level1"
                            Text="Email"></asp:Label><asp:TextBox ID="txtEmail" runat="server" CssClass="st-forminput"
                                Width="200px"></asp:TextBox></div><div class="clear">
                    </div>
                </div>
                <div class="st-form-line-noleft">
                    <div class="half">
                        <asp:Label ID="LabelCountry" runat="server" CssClass="st-labeltext level1" Text="National/Country"></asp:Label><asp:DropDownList
                            ID="drpNationCountry" runat="server" CssClass="st-forminput" Width="200px" DataTextField="CountryName"
                            DataValueField="CountryId">
                        </asp:DropDownList>
                    </div>
                    <div class="half last">
                        <asp:Label ID="LabelWebAddress" runat="server" AssociatedControlID="txtWebAddress"
                            CssClass="st-labeltext level1" Text="Web Address"></asp:Label><asp:TextBox ID="txtWebAddress"
                                runat="server" Width="200px" CssClass="st-forminput st-disable" ReadOnly="true"></asp:TextBox></div><div class="clear">
                    </div>
                </div>
                <div class="st-form-line-noleft">
                    <div class="half">
                        <asp:Label ID="County" runat="server" CssClass="st-labeltext level1" Text="County"
                            AssociatedControlID="txtCounty"></asp:Label><asp:TextBox ID="txtCounty" runat="server"
                                CssClass="st-forminput" Width="200px"></asp:TextBox></div><div class="half last">
                        <asp:Label ID="LabelIsActive" CssClass="st-labeltext level1" runat="server" Text="Is Active"></asp:Label><asp:Literal
                            ID="LiteralIsActive" runat="server" Text='No'></asp:Literal></div><div class="clear">
                    </div>
                </div>
                <div class="st-form-line-noleft">
                    <div class="half">
                        <asp:Label ID="LabelCityTown" runat="server" AssociatedControlID="txtCityTown" CssClass="st-labeltext level1"
                            Text="Town/Village/City"></asp:Label><asp:TextBox ID="txtCityTown" runat="server"
                                CssClass="st-forminput" Width="200px"></asp:TextBox></div><div class="half last">
                    </div>
                    <div class="clear">
                    </div>
                </div>
                <div class="st-form-line-noleft">
                    <div class="half">
                        <asp:Label ID="LabelPostcode" runat="server" AssociatedControlID="txtPostcode" CssClass="st-labeltext level1"
                            Text="Postcode">
                        </asp:Label><asp:TextBox ID="txtPostcode" runat="server" CssClass="st-forminput st-disable"
                            Width="150px" ReadOnly="true"></asp:TextBox><asp:LinkButton ID="ButtonPostcodeLookup"
                                runat="server" CausesValidation="False" CssClass="hg-blue" Text="Lookup" OnClick="ButtonPostcodeLookup_Click" />
                    </div>
                    <div class="half last">
                    </div>
                    <div class="clear">
                    </div>
                </div>
                <div class="st-form-line-noleft">
                    <div class="half">
                        </div><div class="half last">
                    </div>
                    <div class="clear">
                    </div>
                </div>
                <asp:HiddenField ID="HiddenFieldTeamId" runat="server" />
                <asp:HiddenField ID="HiddenFieldBusinessId" runat="server" />
                <asp:HiddenField ID="HiddenFieldAddressId" runat="server" />
                <asp:HiddenField ID="HiddenFieldContactId" runat="server" />
                <asp:HiddenField ID="HiddenFieldDepartmentId" runat="server" />
                <%--BUSINESS LOOKUP--%>
                <wuc:TypeOfBusinessLookup ID="BusinessLookup" runat="server" TextBoxBusinessNameId="txtTypeOfBusiness"
                    TextBoxSicCodeId="txtSicCode" HiddenFieldBusinessId="HiddenFieldBusinessId" MaximumRows="5" />
                <%--CONTACT LOOKUP--%>
                <wuc:ContactLookupPopup ID="ContactLookupPopup" runat="server" TextBoxResultId="txtLeadContact"
                    HiddenFieldResultId="HiddenFieldContactId" MaximumRows="5" />
                <%--WEB USER CONTROL--%><%--ADDRESS - POSTCODE LOOKUP--%>
                <wuc:AddressLookupPopup ID="AddressLookupPopup" runat="server" />
            </asp:Panel>
        </div>
    </div>
</asp:Content>
